\section{num2str --- Number to string conversion}
\label{fn:num2str}
\index{num2str()}
\index{number to string conversion}
\begin{rail}
NumToStr : 'num2str' '(' Scalar ')' ;
\end{rail}

\verb+num2str+ converts a real scalar into a $1x1$ string matrix.
This may result in scientific notation if the scalar is particularly
large or small.  An error will result if the argument is not a real
scalar.

$\Longrightarrow$ This is not an \RLaB\ built-in function.  This function
is normally loaded on start-up from the \verb+num2str.r+ file in the
standard \verb+rlib+ directory. Use of the \verb+-r+ option, incorrectly 
setting the \verb+RLAB_LIB_DIR+ environmental variable, or modifying
\verb+num2str.r+ may make this function unavailable.


\paragraph{Example}
\index{example of num2str()}
\index{num2str()!example}
\begin{verbatim}
> a = 3.4321
 a =
     3.43
> b = num2str(a)
3.432
> show(b)
   name:      b       
   class:     string  
    type:     string  
     nr:      1       
     nc:      1       
> num2str(298649678)
2.986e+08
> show(num2str(298649678))
   name:      NULL    
   class:     string  
    type:     string  
     nr:      1       
     nc:      1     
\end{verbatim}

See also: Page~\pageref{fn:int2str} \verb+int2str()+,
Page~\pageref{fn:sprintf} \verb+sprintf()+.

\newpage



